<template>
	<view class="page_box">
		<view class="content">
			<view
				class="list"
				v-for="(item, index) in data"
				:key="index"
				
			>
				<view class="left1">
					<image :src="item.avatar" mode=""></image>
					<text>{{ item.nickname }}</text>
				</view>
				<view class="right">
					<text class="text">已完成 {{ item.plan }}</text>
				</view>
			</view>
		</view>

		<!-- 自定义底部导航 -->
		<shopro-tabbar></shopro-tabbar>
		<!-- 关注弹窗 -->
		<shopro-float-btn></shopro-float-btn>
		<!-- 连续弹窗提醒 -->
		<shopro-notice-modal></shopro-notice-modal>
		<!-- 登录提示 -->
		<shopro-login-modal></shopro-login-modal>
	</view>
</template>

<script>
export default {
	data() {
		return {
			data: []
		};
	},
	methods: {
		// 获取用户的id
		async getUsers() {
			const res = await this.$api('user.info');
			var uid = res.data.id;
			this.getUsrLst(uid);
		},
		//用户直推列表
		async getUsrLst(uid) {
			console.log('uid :>> ', uid);
			const res = await this.$api('directPushUsrLst', {
				uid: uid
			});
			console.log('用户直推列表 :>> ', res);
			this.data = res;
		}
	},
	onLoad() {
		this.getUsers();
	}
};
</script>
<style lang="scss">
.content {
	.list {
		width: 690rpx;
		height: 100rpx;
		background: #ffffff;
		margin: 0 auto;
		margin-top: 20rpx;
		border-radius: 10rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 20rpx;
		.left1 {
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
			display: flex;
			align-items: center;

			image {
				width: 80rpx;
				height: 80rpx;
				border-radius: 50%;
				//background-color: red;
			}
			text {
				height: 28rpx;
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
				line-height: 28rpx;
				margin-left: 20rpx;
			}
		}
		.right {
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			align-items: flex-end;
			.text {
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #eabb6c;
				margin-left: 19rpx;
			}
		}
	}



}
</style>
